pub mod commands;
pub mod session;

use std::{fs, path::PathBuf};

pub struct AppState {
    pub db_path: PathBuf,
}

impl AppState {
    pub fn new_with_path(path: PathBuf) -> Self {
        if let Some(parent) = path.parent() {
            let _ = fs::create_dir_all(parent);
        }
        AppState { db_path: path }
    }
}


